<script setup lang="ts">
import { onMounted } from 'vue'
const props = defineProps({
  image: {
    type: String,
    default: './assets/loading-screen.jpg'
  },
  showCancelBtn: {
    type: Boolean
  },
  message: {
    type: String,
    default: ''
  }
})
</script>
<template>
  <div class="loading-screen" :style="{ 'background-image': `url(${image})` }">
    <div class="loading-screen-content">
      <div class="loading-message">{{ message }}</div>
      <button v-if="showCancelBtn" @click="$emit('cancel')" class="button">取消</button>
    </div>
    <progress class="progress is-primary" max="100">30%</progress>
  </div>
</template>
